package com.ngkj.zmfptback.sys.mapper.read;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ngkj.zmfptback.sys.bean.OperationEntity;
import com.ngkj.zmfptback.sys.bean.RoleEntity;
import com.ngkj.zmfptback.sys.bean.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ChenHN
 * @since 2021/12/1 creation
 **/
@Mapper
public interface UserReadMapper extends BaseMapper<UserEntity> {

    UserEntity getUserByUsername(@Param("username") String username);

    List<RoleEntity> getRoleByUserId(@Param("id") Integer id);

    List<OperationEntity> getOperationsByUserId(@Param("id") Integer id);

    UserEntity getUserByEmail(@Param("email") String email);

    UserEntity getUserByUserId(String id);

    IPage<UserEntity> getUserList(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("userEntity") UserEntity userEntity, Page<UserEntity> page);


    UserEntity getMyUser(String id);

    Long getRealUserIdByUserId(Long userId);

    UserEntity getUserInfoByRealId(Long id);
}

